package com.hyt.it.ogt.ks;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;


/**
 * @author liuhh
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.hyt"})
@EnableHystrixDashboard
@EnableHystrix
@MapperScan(basePackages = {"com.hyt.it.ogt.bm.mapper", "com.hyt.it.ogt.cj.mapper", "com.hyt.it.ogt.dict.mapper"})
@ComponentScan(basePackages = {"com.hyt"})
@EnableMongoRepositories(basePackages = "com.hyt.it.ogt.ks.mapper.mongodb")
public class Application {

    /**
     * 启动main方法
     *
     * @param args 参数
     */
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
        //CandidateExamOnlineListener.setCandidateWebSocketService(run.getBean(CandidateWebSocketService.class));
    }

}
